<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html">
<h:head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<link rel="stylesheet" type="text/css" href="${facesContext.externalContext.request.contextPath}/CSS/Login.css" />
<title>Seja bem vindo!</title>
</h:head>
<body onload="" style="background-color: #F8F8F8;">

	<f:view>
		<h:form id="login" >

			<div style="margin-top: 5%; text-align: center;">
				<span class="titulo"><h:outputText value="#{msgs['titulo']}"></h:outputText></span>
			</div>
			
			<div class="borda" style="margin-top: 5%; margin-left: 30%; width: 40%; height: 250px;">
				
				<b class="b1"></b><b class="b2"></b><b class="b3"></b><b class="b4"></b>
				
				<div class="conteudo">
					<br />
					<div style="font-size: 9pt; text-align: center;">
						<b><h:outputText value="#{msgs['login.digiteUsuarioESenha']}"></h:outputText></b>
						<br/>
						<br/>
						<h:message id="usuarioNotFoundException" for="usuarioNotFoundException" style="color: red;"/>
					</div>
					<div style="margin-left: 25%; font-size: 9pt">
						<br />
						<div>
							<h:outputText value="&nbsp;#{msgs['login.nomeDoUsuario']}"></h:outputText>
						</div>
						<div>
							<h:inputText id="nome" value="#{usuarioMB.usuario.nome}" size="30" required="true" requiredMessage="#{msgs['campoObrigatorio']}">
								<f:ajax event="blur" execute="@this" render="erroNome"></f:ajax>
								<f:ajax event="keyup" execute="@this" render="erroNome"></f:ajax>
							</h:inputText>
							<br/>
							<h:message id="erroNome" for="nome" errorStyle="color: red;"/>
						</div>
						<br />
						<div>
							<h:outputText value="&nbsp;#{msgs['login.senha']}"></h:outputText>
						</div>
						<div>
							<h:inputSecret id="senha" value="#{usuarioMB.usuario.senha}" size="30" required="true" requiredMessage="#{msgs['campoObrigatorio']}">
								<f:ajax event="blur" execute="@this" render="erroSenha"></f:ajax>
								<f:ajax event="keyup" execute="@this" render="erroSenha"></f:ajax>
							</h:inputSecret>
							<br/>
							<h:message id="erroSenha" for="senha" errorStyle="color: red;"/>
						</div>
						<div>
							<!-- <h:outputText id="eco" value="#{usuarioMB.usuario.nome}" rendered="false"></h:outputText> -->
							<h:link value="#{msgs['login.criarConta']}" outcome="CadastroUsuario" />
						</div>
						<br />
					</div>
					<div style="text-align: center">
						<h:commandButton value="Entrar" action="#{usuarioMB.logar}">
							<!-- <f:ajax event="action" execute="@form" render="@all"></f:ajax> -->
						</h:commandButton>
					</div>
				</div>
				<b class="b4"></b><b class="b3"></b><b class="b2"></b><b class="b1"></b>
			</div>

		</h:form>

	</f:view>

</body>
</html>



